buildconfig: Fix setopt in case where option is already set but to the wrong value
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Jun 2010 10:37:24 +0000 (11:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 15 Jun 2010 10:37:24 +0000 (11:37 +0100)
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
buildconfigs/enable-xen-config

index 9d15648a6025017f2b61ff119b29bc5815e79c7e..a4dc5362c2d229697e0e333688d4d08e24785aa7 100644 (file)
@@ -15,7 +15,7 @@ setopt()
        VALUE=$2
 
        # First remove any existing instances of this option
-       sed -e "s/^# ${OPTION} is not set$//g ; s/^^{OPTION}=.$//g" -i "${CONFIG}"
+       sed -e "s/^# ${OPTION} is not set$//g ; s/^${OPTION}=.*$//g" -i "${CONFIG}"
 
        # Then append the new value
        case ${VALUE} in